package ModelLayer;

import java.util.ArrayList;

public class Supplier 
{
	private int supplierId;
	private String supplierName;
	private String country;
	private int phoneNumber;
	private String email;
	private ArrayList<Product> products;
	
	//Empty constructor
	public Supplier()
	{
		
	}
	
	//Constructor which takes supplier ID as a parameter
	public Supplier(int supplierid)
	{
		this.supplierId = supplierid;
	}
	
	//Transforms the attributes to a string
	public String toString()
	{
		return Integer.toString(supplierId);
	}
	
	//Constructor which takes supplierid, suppliername, country, phonenumber and email as a parameter
	public Supplier(int supplierId, String supplierName, String country, int phoneNumber, String email)
	{
		this.supplierId = supplierId;
		this.supplierName = supplierName;
		this.country = country;
		this.phoneNumber = phoneNumber;
		this.email = email;
		products = new ArrayList<Product>();
	}
	
	//Adds a product array
	public void addProductsArray(ArrayList<Product> product)
	{
		this.products = product;
	}
	//Returns supplier ID
	public int getSupplierId() 
	{
		return supplierId;
	}

	//Sets supplier id
	public void setSupplierId(int supplierId) 
	{
		this.supplierId = supplierId;
	}

	//Returns supplier name
	public String getSupplierName() 
	{
		return supplierName;
	}

	//Sets supplier name
	public void setSupplierName(String supplierName) 
	{
		this.supplierName = supplierName;
	}

	//Returns Origin Country
	public String getCountry() 
	{
		return country;
	}

	//Sets origin country
	public void setCountry(String country) 
	{
		this.country = country;
	}

	//Returns phonenumber
	public int getPhoneNumber() 
	{
		return phoneNumber;
	}

	//Sets the phonenumber
	public void setPhoneNumber(int phoneNumber) 
	{
		this.phoneNumber = phoneNumber;
	}

	//Returns email
	public String getEmail() 
	{
		return email;
	}

	//Sets the email
	public void setEmail(String email) 
	{
		this.email = email;
	}
	

}
